]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Fix popup menu layouts in RTL directions
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 19 Jul 2013 11:14:33 +0000 (07:14 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 22 Jul 2013 11:09:19 +0000 (07:09 -0400)
The math for inverting RTL layouts (which was copy/pasted from
ClutterBoxLayout) was incorrect for non-zero child offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=704542

js/ui/popupMenu.js

index 8bd836c91a0361e1c1461a4bea3b7b2ebd45f976..57d9b49e2d92cc78664dafdafca2328d44abdd64 100644 (file)
@@ -317,7 +317,7 @@ const PopupBaseMenuItem = new Lang.Class({
             }
 
             if (direction == Clutter.TextDirection.RTL)
-                childBox.x1 = width - x - availWidth;
+                childBox.x1 = box.x1 + (box.x2 - x - availWidth);
             else
                 childBox.x1 = x;
             childBox.x2 = childBox.x1 + availWidth;